package com.luhuiguo.cms.shared.event;

import com.google.gwt.event.shared.GwtEvent;

public class EditAttachmentEvent extends GwtEvent<EditAttachmentEventHandler> {
    public static Type<EditAttachmentEventHandler> TYPE = new Type<EditAttachmentEventHandler>();

    private final Long attachmentId;

    public EditAttachmentEvent(Long attachmentId) {
        this.attachmentId = attachmentId;
    }

    public Long getAttachmentId() {
        return attachmentId;
    }

    @Override
    public Type<EditAttachmentEventHandler> getAssociatedType() {
        return TYPE;
    }

    @Override
    protected void dispatch(EditAttachmentEventHandler handler) {
        handler.onEditAttachment(this);
    }
}
